export const getParentPath= (router, childKey)=> {
    for (let i = 0; i < router.length; i++) {
      const route = router[i];
  
      if (route.key === childKey) {
        return true;
      }
  
      if (route.children) {
        const parentPath = getParentPath(route.children, childKey);
        if (parentPath) {
          return route.key;
        }
      }
    }
    return "";
  }
